import {defineConfig} from 'vite';
import vue from '@vitejs/plugin-vue';
import path from "path";

export default defineConfig({
    plugins: [
        vue()
    ],
    resolve: {
        alias: {
            '@': path.resolve(__dirname, 'src'),
            '@img': path.resolve(__dirname, 'src/assets/img'),
            '@icon': path.resolve(__dirname, 'src/assets/icon'),
            '@vc': path.resolve(__dirname, 'src/components'),
            '@pa': path.resolve(__dirname, 'src/pages'),
            '@pi': path.resolve(__dirname, 'src/pinia'),
            '@ut': path.resolve(__dirname, 'src/utils'),
        }
    },
    server: {
        port: 8080
    },
    css: {
        preprocessorOptions: {
            less: {
                additionalData: `@import "/src/assets/less/index.less";`
            }
        }
    }
})